#ifndef SHADER_H
#define SHADER_H

#include "d3dUtil.h"

namespace mgfx
{
	struct ModelDrawCall;

	enum ShaderID
	{
		NONE,
		TEXTURED,
		PHONG_1PL,
		NORMAL_1PL,
		AMBIENT,
		SHADOW_VOLUME,
	};

	class Shader
	{
	public:
		Shader();
		ID3D10Effect * Effect;
		ID3D10EffectTechnique* Tech;

		ID3D10RasterizerState * RasterizerState;
		ID3D10DepthStencilState * DepthStencilState;
		UINT StencilRef;
		ID3D10BlendState * BlendState;

		bool load(ID3D10Device* device, ShaderID id);
		virtual bool init() = 0;

		virtual void setParamsGlobal() = 0;
		virtual void setParamsModel(ModelDrawCall * drawCall) = 0;
		FORCEINLINE void setStates(ID3D10Device * device);

		bool isInitialized() { return mInitialized; }

		ShaderID ID;

	protected:
		
		bool mInitialized;
		const wchar_t * mFilename;

	};
}


#endif